using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class TestUI : MonoBehaviour
{
    [SerializeField] Button m_buttonSwicthDifficulty;
    [SerializeField] Button m_buttonSwitchExtraDifficulty;
    [SerializeField] Text m_textLevelInfo;

    // Start is called before the first frame update
    void Start()
    {
        RefreshleveIInfo();

        m_buttonSwicthDifficulty.onClick.AddListener(()=> {
            TripleMatch.LevelManager.S.SwitchDifficultData();
            RefreshleveIInfo();
        });

        m_buttonSwitchExtraDifficulty.onClick.AddListener(() => {
            TripleMatch.LevelManager.S.SwitchExtraDifficultData();
            RefreshleveIInfo();
        });
    }

    private void RefreshleveIInfo()
    {
        m_textLevelInfo.text = "diff:" + TripleMatch.LevelManager.S.standardDifficulty.ToString() + "\nextraDiff:" + TripleMatch.LevelManager.S.extraDifficulty;
    }
}
